import java.math.BigInteger;
import java.util.Arrays;

public class Leet338 {
    public static void main(String[] args) {
        int num = 2;
        int[] nums = new int[num+1];
        for(int i = 0;i<=num;i++){
            String s = Integer.toBinaryString(i);
            int t = 0;
            for (char c :s.toCharArray()){
                if (c=='1')
                    t++;
            }
            nums[i] = t;
        }
        System.out.println(Arrays.toString(nums));
    }
}
